package com.simulation.demo.controller;

import com.simulation.demo.entity.ExportEntity;
import com.simulation.demo.service.ExcelService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @author buddy
 * @date 2021/7/30
 */
@RestController
public class ExcelController {

    @Autowired
    private ExcelService excelService;

    /**
     * 导出excel
     * @return web 路径
     */
    @GetMapping("/exportExcel")
    public String exportExcel() {
        return excelService.exportExcel();
    }


    /**
     * 导入excel
     * @return web 路径
     */
    @GetMapping("/importExcel")
    public List<ExportEntity> importExcel() {
        return excelService.importExcel();
    }
}
